home *** CD-ROM | disk | FTP | other *** search
- global playerShipSO, armorSO, pBulletSO, eBulletSO, enemySO, enemyData, fleetMovementData, playerData, pBulletData, eBulletData, armorData, playerlevel
-
- on initializeEnemyBugs
- global frameNumber, frameDelay, swooperType
- frameNumber = 0
- frameDelay = 0
- fleetMovementData = [point(0, 100), #right, 0]
- case playerlevel of
- 1:
- maxLines = 4
- eTypes = [2, 1, 1, 1]
- 2:
- maxLines = 4
- eTypes = [3, 2, 1, 1]
- 3:
- maxLines = 4
- eTypes = [4, 3, 2, 1]
- 4:
- maxLines = 4
- eTypes = [4, 3, 2, 2]
- 5:
- maxLines = 4
- eTypes = [4, 4, 3, 2]
- end case
- swooperType = eTypes[1]
- enemyData = []
- wSprite = enemySO - 1
- repeat with xBug = 1 to 10
- repeat with yBug = 1 to maxLines
- wSprite = wSprite + 1
- anchorLoc = point(xBug * 40, yBug * 40) + point(-20, -20)
- startingLoc = point(random(1000 - 400), 0 - random(150))
- add(enemyData, [1, eTypes[yBug], 0, anchorLoc, startingLoc, 0, 0])
- set the loc of sprite wSprite to point(xBug * 40, yBug * 40) + fleetMovementData[1]
- set the ink of sprite wSprite to 36
- end repeat
- end repeat
- end
-
- on initializeArmors
- armorData = []
- totalArmors = 4
- repeat with wArmor = 1 to totalArmors
- wSprite = armorSO + wArmor - 1
- spawnloc = point(580.0 / (totalArmors + 1) * wArmor, 350)
- set the loc of sprite wSprite to spawnloc
- sprite(wSprite).visible = 1
- aSize = point(70, 20)
- sizeRect = rect(spawnloc[1] - (aSize[1] / 2), spawnloc[2] - (aSize[2] / 2), spawnloc[1] + (aSize[1] / 2), spawnloc[2] + (aSize[2] / 2))
- add(armorData, [4, spawnloc, sizeRect])
- set the member of sprite wSprite to "Armor 4"
- end repeat
- end
-
- on initializeplayer
- playerData = [1, point(290, 390), 0]
- set the loc of sprite playerShipSO to point(580 / 2, 360)
- end
-
- on initializePBullets
- pBulletData = []
- repeat with wPBullet = 1 to 10
- wSprite = pBulletSO + wPBullet - 1
- add(pBulletData, [0, point(0, 0), 0, 0])
- set the loc of sprite wSprite to point(-50, -50)
- set the ink of sprite wSprite to 36
- end repeat
- end
-
- on initializeEBullets
- eBulletData = []
- repeat with wEBullet = 1 to 10
- wSprite = eBulletSO + wEBullet - 1
- add(eBulletData, [0, point(0, 0), 0, 0])
- set the loc of sprite wSprite to point(-50, -50)
- set the ink of sprite wSprite to 36
- end repeat
- end
-